home *** CD-ROM | disk | FTP | other *** search
- property pSpr, pTimer
-
- on beginSprite me
- pSpr = sprite(me.spriteNum)
- pSpr.locZ = 99
- end
-
- on endSprite me
- pSpr.locZ = me.spriteNum
- end
-
- on mouseEnter me
- global gCurrentItem
- if draggingIngredient() then
- exit
- end if
- pTimer = nowTicks()
- itemCode = #tipregister
- gCurrentItem = itemCode
- if not draggingIngredient() then
- refreshHelpWindow(itemCode)
- end if
- showDrinkContents(#tipregister, VOID, VOID)
- end
-
- on mouseLeave me
- if not draggingIngredient() then
- hideToolTip()
- end if
- end
-
- on customToolTip me, tipType
- global gPlayerTipsThisLevel, gToolTip
- if inBonusMode() then
- tipType = #Current
- else
- if inRecipeMode() then
- tipType = #earned
- end if
- end if
- laserLoc = point(320, 450)
- case tipType of
- #min:
- tipText = "Min Tips:" & RETURN & "$" && currentLevel(#MINTIPS)
- #max:
- tipText = "Max Tips:" & RETURN & "$" && currentLevel(#MAXEARLYTIPS)
- #Current:
- tipText = "Shift Tips:" & RETURN & "$" && string(gPlayerTipsThisLevel)
- #earned:
- tipText = "Practice:" & RETURN & "$" && string(gPlayerTipsThisLevel)
- end case
- sendSprite(gToolTip, #mShowToolTip, pSpr, tipText, laserLoc)
- end
-
- on mouseWithin me
- if the mouseDown then
- exit
- end if
- if draggingIngredient() then
- else
- if tipTickRange(pTimer) then
- customToolTip(me, #min)
- else
- end if
- end if
- end
-
- on mouseDown me
- if draggingAnything() then
- replaceDraggingAnything()
- exit
- end if
- if the shiftDown or the optionDown then
- customToolTip(me, #Current)
- else
- if commandOrControlDown() then
- customToolTip(me, #max)
- else
- customToolTip(me, #min)
- end if
- end if
- end
-